import java.util.Scanner;
public class Lab03_Task01C {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
String line = s.nextLine();
String[] numbers = line.split("\\s+");
int x = Integer.parseInt(numbers[0]), y = Integer.parseInt(numbers[1]), z = Integer.parseInt(numbers[2]);
x = x-1;
z = z+2;
int total = ((x+y)+(y-z)+(x*z))/3;
System.out.println("Result of Magic calculations = "+total);
}
}